package com.chinasoft.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

//@Controller
//@ResponseBody
@RestController
@RequestMapping("/user")
public class UserController {

//    @RequestMapping(value = "/user/{id}" ,method = RequestMethod.GET)
//    public String restLocation(@PathVariable Integer id){
//        System.out.println("restLocation id = " + id);
//        return "success.jsp";
//    }

    //@RequestMapping(value = "/{id}" ,method = RequestMethod.GET)
    @GetMapping("{id}")
    public String get(@PathVariable Integer id){
        System.out.println("get id = " + id);
        return "success.jsp";
    }
    @PostMapping("{id}")
    public String post(@PathVariable Integer id){
        System.out.println("post id = " + id);
        return "success.jsp";
    }
    @PutMapping("{id}")
    public String put(@PathVariable Integer id){
        System.out.println("PUT id = " + id);
        return "success.jsp";
    }
    @DeleteMapping("{id}")
    public String delete(@PathVariable Integer id){
        System.out.println("delete id = " + id);
        return "success.jsp";
    }

}